﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Sunny.UI;
namespace OtherDevice
{
    [Description("气密仪")]
    public partial class Form_气密仪 : Form_ControlBase
    {
        public Form_气密仪()
        {
            InitializeComponent();
        }
        AT_Base device_AT = null;
        public override void FlushToDlg(object devicebase)
        {
            try
            {
                if (devicebase == null)
                    return;
                this.device_AT = devicebase as AT_Base;
                this.Dock = DockStyle.Fill;
                this.Show();
            }
            catch (Exception)
            {

            }

        }

        private void btn_获取数据_Click(object sender, EventArgs e)
        {
            double d_大泄露 = 0;
            double d_小泄露 = 0;
            if(device_AT.Fucntion_获取气密测试(ref d_大泄露, ref d_小泄露, 3000)==0)
            {
                lbl_大泄露.Text = $"大泄露：{d_大泄露}";
                lbl_小泄露.Text = $"大泄露：{d_小泄露}";
            }
            else
            {
                MessageBox.Show("获取数据失败");
            }

        }
    }
}
